from django.db import models

class Project(models.Model):
    name = models.CharField(max_length=200)
    
    def __unicode__(self):
        return self.name

class Category(models.Model):
    name = models.CharField(max_length=200)

    class Meta:
        verbose_name_plural = 'categories'

    def __unicode__(self):
        return self.name

class Task(models.Model):
    description = models.CharField(max_length=255)
    category = models.ForeignKey(Category)
    project = models.ForeignKey(Project)
    completed = models.BooleanField()
    due_date = models.DateField()

    def __unicode__(self):
        return self.description
    

